import client from './client';

export interface User {
  id: number;
  username: string;
  max_bandwidth_up: number;
  max_bandwidth_down: number;
  traffic_limit: number | null;
  traffic_used: number;
  expire_at: string | null;
  enabled: boolean;
  created_at: string;
  updated_at: string;
}

export const listUsers = () => client.get('/users');

export const createUser = (data: any) => client.post('/users', data);

export const updateUser = (id: number, data: any) => client.put(`/users/${id}`, data);

export const deleteUser = (id: number) => client.delete(`/users/${id}`);

export const kickUser = (id: number) => client.post(`/users/${id}/kick`);
